<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="SingletonFactory,com.developmentarc.core.utils.SingletonFactory,instance,lock,clearAllSingletonInstances,clearSingletonInstance,getSingletonInstance" name="keywords">
<title>com.developmentarc.core.utils.SingletonFactory</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'SingletonFactory - DevelopmentArc Core API Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">DevelopmentArc Core API</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/developmentarc/framework/utils/SingletonFactory.html&amp;com/developmentarc/framework/utils/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;SingletonFactory</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class SingletonFactory"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.developmentarc.core.utils</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class SingletonFactory</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">SingletonFactory <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../images/inherit-arrow.gif"> <a href="InstanceFactory.html">InstanceFactory</a></td>
</tr>
</table>
<p></p>
  A Singleton Class that enables any item to be used as
  a Singleton reference.  This Class creates a new instance
  of the requested Class type and then stores the reference
  in a static table.  When an instance of a previously requested
  Class is made, the perviously generated instance is returned.
  
  <p>This class acts as a Singlton facade to the InstanceFactory
  Class. </p>
  
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a><a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Properties</div>
<div class="showHideLinks">
<div class="hideInheritedProtectedProperty" id="hideInheritedProtectedProperty">
<a onclick="javascript:setInheritedVisible(false,'ProtectedProperty');" href="#protectedPropertySummary" class="showHideLink"><img src="../../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Protected Properties</a>
</div>
<div class="showInheritedProtectedProperty" id="showInheritedProtectedProperty">
<a onclick="javascript:setInheritedVisible(true,'ProtectedProperty');" href="#protectedPropertySummary" class="showHideLink"><img src="../../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Protected Properties</a>
</div>
</div>
<table id="summaryTableProtectedProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#instance">instance</a> : <a href="../utils/SingletonFactory.html">SingletonFactory</a>
<div class="summaryTableDescription">[static][read-only]
   Returns the current instance of the SingletonFactory.</div>
</td><td class="summaryTableOwnerCol">SingletonFactory</td>
</tr>
<tr class="hideInheritedProtectedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="InstanceFactory.html#instanceTable">instanceTable</a> : <a href="../datastructures/utils/HashTable.html">HashTable</a>
<div class="summaryTableDescription">
   Stores the local instances for the factory.</div>
</td><td class="summaryTableOwnerCol"><a href="InstanceFactory.html">InstanceFactory</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#lock">lock</a> : Class<div class="summaryTableDescription">[static][read-only]
   Enables extended Classes to access the lock.</div>
</td><td class="summaryTableOwnerCol">SingletonFactory</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<div class="showHideLinks">
<div class="hideInheritedMethod" id="hideInheritedMethod">
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Methods</a>
</div>
<div class="showInheritedMethod" id="showInheritedMethod">
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Methods</a>
</div>
</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="InstanceFactory.html#clearAllInstances()">clearAllInstances</a>():void</div>
<div class="summaryTableDescription">
   Used to remove all current instances from the Factory.</div>
</td><td class="summaryTableOwnerCol"><a href="InstanceFactory.html">InstanceFactory</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clearAllSingletonInstances()">clearAllSingletonInstances</a>():void</div>
<div class="summaryTableDescription">[static]
   Used to remove all current instances from the Factory.</div>
</td><td class="summaryTableOwnerCol">SingletonFactory</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="InstanceFactory.html#clearInstance()">clearInstance</a>(type:Class):void</div>
<div class="summaryTableDescription">
   Used to remove a specific instance type from the factory.</div>
</td><td class="summaryTableOwnerCol"><a href="InstanceFactory.html">InstanceFactory</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clearSingletonInstance()">clearSingletonInstance</a>(type:Class):void</div>
<div class="summaryTableDescription">[static]
   Used to remove a specific instance type from the factory.</div>
</td><td class="summaryTableOwnerCol">SingletonFactory</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="InstanceFactory.html#getInstance()">getInstance</a>(type:Class):*</div>
<div class="summaryTableDescription">
   Used to get access to an instance of the Class type
   requested.</div>
</td><td class="summaryTableOwnerCol"><a href="InstanceFactory.html">InstanceFactory</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getSingletonInstance()">getSingletonInstance</a>(type:Class):*</div>
<div class="summaryTableDescription">[static]
   Used to get access to an instance of the Class type
   requested.</div>
</td><td class="summaryTableOwnerCol">SingletonFactory</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="instance"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">instance</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>instance:<a href="../utils/SingletonFactory.html">SingletonFactory</a></code>&nbsp;&nbsp;[read-only]<p>
   Returns the current instance of the SingletonFactory.
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;protected static function get instance():<a href="../utils/SingletonFactory.html">SingletonFactory</a></code>
<br>
</div>
<a name="lock"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">lock</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>lock:Class</code>&nbsp;&nbsp;[read-only]<p>
   Enables extended Classes to access the lock.
    
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;protected static function get lock():Class</code>
<br>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="clearAllSingletonInstances()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clearAllSingletonInstances</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public static function clearAllSingletonInstances():void</code><p>
   Used to remove all current instances from the Factory.
   
   </p></div>
<a name="clearSingletonInstance()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clearSingletonInstance</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function clearSingletonInstance(type:Class):void</code><p>
   Used to remove a specific instance type from the factory.
   This method checks to see if the requeted type has an intance
   in the table, and if so the instance is removed.  This enables
   getInstance() to create a new instance the next time the method
   is called.  If the instance type does not exist, nothing occurs.
    
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">type</span>:Class</code> &mdash; The type of instance to look for and remove.
   
   </td>
</tr>
</table>
</div>
<a name="getSingletonInstance()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getSingletonInstance</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function getSingletonInstance(type:Class):*</code><p>
   Used to get access to an instance of the Class type
   requested.  This method first determines if the Class
   type has been requested before.  If the Class has never
   been requested, the method creates a new instance of the
   Class, stores it in a table and then returns a reference
   to the Class.
   
   </p><p>If the Class type has been requested previously, the
   method returns the previously generated instance. </p>
    
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">type</span>:Class</code> &mdash; The Class of the instance to return.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code> &mdash; The generated instance of the Class.
   
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
